package com.hongye.province.controller;

import java.util.List;

import com.hongye.common.domain.FangProvince;
import com.hongye.province.domain.vo.FangProvinceVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.hongye.common.security.annotation.RequiresPermissions;

import com.hongye.province.service.IFangProvinceService;
import com.hongye.common.core.web.controller.BaseController;
import com.hongye.common.core.web.page.TableDataInfo;

/**
 * 省份列表Controller
 * 
 * @author hdd
 * @date 2025-01-09
 */
@RestController
@RequestMapping("/province")
public class FangProvinceController extends BaseController
{
    @Autowired
    private IFangProvinceService fangProvinceService;

    /**
     * 查询省份列表列表
     */
    @RequiresPermissions("province:province:provinceList")
    @GetMapping("/provinceList")
    public TableDataInfo provinceList(FangProvince fangProvince)
    {
        startPage();
        List<FangProvinceVo> list = fangProvinceService.selectFangProvinceList(fangProvince);
        return getDataTable(list);
    }






//    /**
//     * 获取省份列表详细信息
//     */
//    @RequiresPermissions("province:province:query")
//    @GetMapping(value = "/{id}")
//    public AjaxResult getInfo(@PathVariable("id") Integer id)
//    {
//        return success(fangProvinceService.selectFangProvinceById(id));
//    }
//
//    /**
//     * 新增省份列表
//     */
//    @RequiresPermissions("province:province:add")
//    @Log(title = "省份列表", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody FangProvince fangProvince)
//    {
//        return toAjax(fangProvinceService.insertFangProvince(fangProvince));
//    }
//
//    /**
//     * 修改省份列表
//     */
//    @RequiresPermissions("province:province:edit")
//    @Log(title = "省份列表", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody FangProvince fangProvince)
//    {
//        return toAjax(fangProvinceService.updateFangProvince(fangProvince));
//    }
//
//    /**
//     * 删除省份列表
//     */
//    @RequiresPermissions("province:province:remove")
//    @Log(title = "省份列表", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{ids}")
//    public AjaxResult remove(@PathVariable Integer[] ids)
//    {
//        return toAjax(fangProvinceService.deleteFangProvinceByIds(ids));
//    }
}
